home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
turbovis
/
dlgds411.zip
/
DLGDSN.DOC
< prev
next >
Wrap
Text File
|
1994-01-10
|
22KB
|
621 lines
January 9, 1994
Dialog Design
A Dialogbox Design Program for Turbo Vision
Version 4.1
(C) Copyright 1990-4 by L. David Baldwin.
All Rights Reserved.
Further copyright information given below.
OVERVIEW
Dialog Design takes some of the pain out of designing dialog boxes for
Borland's Turbo Vision package. With Dialog Design, dialog controls can be
easily added, edited, rearranged, and the dialog itself sized, moved, etc.
Once the design is satisfactory, Dialog Design can produce source code to
be included in your program or a resource file for use by your program.
Both the Pascal and C++ languages are supported.
REQUIREMENTS
Borland (R) Pascal version 7.0 (Turbo Vision 2.0)
and/or
Borland C++ version 3.1 (Turbo Vision 1.0)
(Dialog Design version 2.x supports Turbo Pascal 6.0)
Some familiarity with the Turbo Vision package
VGA Monitor
A mouse is desirable
GETTING STARTED
Dialog Design uses a number of external conversion programs to generate
source code and resources for the two languages supported. If you have
downloaded this package, the executables of the conversion programs may not
have been included to save download time. If not, you will first have to
compile and link the source before you can do anything meaningful. See the
accompanying READ.ME file for information on how to do this.
When first starting Dialog Design, a Configuration Information dialog will
come up. Enter your preliminary configuration here, in particular the
language you will be using. The default names for the conversion files
will already be listed but you should probably add the complete path to
these names unless they will always be in the default directory.
1
On leaving the this dialog, you will be given the opportunity to save the
configuration. Once saved, you won't have to fill it out each time you
start the program. However, you can change the configuration at any time
using the Options/Configuration menu selection.
A NOTE TO C++ USERS
C++ currently only supports Turbo Vision 1.0. Many of the entry dialogs in
Dialog Design show Turbo Vision 2.0 options. However, in C++ mode, these
options will be grayed or otherwise made inaccessible.
DESIGNING A DIALOG BOX
Dialog Design has three modes of operation:
Design Mode
Dialog Design begins in design mode and this is the mode that you use for
all layout work and editing. In design mode, the dialog doesn't look or
act quite like it will in the final design. Here's some of the
differences:
A 'canvas' background is used to better delineate the actual space
occupied by each control.
Controls are colored red when selected.
Multiple controls may be selected.
All controls may be selected even those not normally selectable.
Try Mode
Try mode is entered using the F9 key. In try mode, the dialog behaves as
it's supposed to. You can check the Tab order, make temporary entries,
and push buttons to actually check how things will work. Exit try mode
with the escape key or click on the close box.
Ordering Mode
Ordering mode allows you to change the Tab order of your dialog controls.
The method for doing this is discussed further below. The F8 key toggles
you into and out of ordering mode.
While there is no fixed way to design a dialog, here's one suggested
sequence:
1.In design mode, work with the dialogbox large enough so that you won't be
crowded.
2
2.From the Add menu, select a control to add. This will bring up a dialog
where you can enter the necessary information. Use the online help (F1
key) if you have a question as to what goes in a particular field. When
the OK button is pushed, the control will appear in the lower right corner
of the design box. The control is then positioned by dragging it with the
mouse, or by using the arrow keys (Shift+arrow moves a little faster).
Work in the upper left corner of the box.
A faster way to add controls is to use the Toolbox. See Toolbox below
for more details.
3.Continue adding controls as desired. At any time, controls can be
repositioned or sized with the mouse (further details below). If
something other than position or size needs changing, select the control
and from the Edit menu choose Edit Selected (or use F7). This will bring
up its dialogbox for changes.
4.When all the controls have been added and positioned, size the box to fit
and move it to the desired location on the desktop. Be sure and add a
title (Edit Dialog from the Edit menu).
5.Enter Try Mode with the F9 key and test the dialog. Be sure to check how
the controls sequence using the Tab key. Exit Try mode with Esc or click
on the close box.
6.If the Tab sequence needs changing, use F8 to enter ordering mode. With
the mouse, click on each control to establish the desired order. Exit
back to design mode with F8.
Changing the sequence without a mouse is a little more complicated. Use
the Tab key to select (highlight) the next control to be sequenced. Then
press the Enter key to enter the selected control into the sequence.
After all controls have been entered, exit back to design mode with F8.
Some controls (such as Static Text, and Labels) don't enter into the
tab sequence of a dialogbox. You can order these if it's convenient, but
the order won't effect the final results.
Be sure to recheck the tab order in Try mode.
7.This is a good time to save your work. Choose Save or Save As from the
File menu to create or update a .DLG file. Any file with the same name
will be renamed with a .BKP extension.
8.You can preview the source code to be generated by choosing one of the
Write Source selections from the Operations menu, and then choosing the
Screen button. The code will appear in a viewer window.
9.To create source code for your dialogbox, choose one of the Write Source
selections from the Operations menu and then choose the File button. See
the section below on Conversion Programs for a discussion of the source
code generated.
3
10.To generate a resource file or add the new dialogbox to an existing
resource or EXE file, choose Write Resource from the Operation menu.
Both a filename and a resource ID name will be requested. If the file
already exists, it will be renamed with a .BKP extension. If the
existing file is a resource or EXE file, it will be copied, and the new
resource added to the copy. Any existing resource with the same ID will
be deleted. Note that the resource ID name is case sensitive.
SELECTING, CLICKING, DRAGGING, SIZING, ETC.
To select a control, click and release on it with the left button or use the
Tab key.
To select multiple controls, select the first, then hold down the shift key
while clicking on the others. Note that, in this mode, clicking toggles
selection on and off so it's possible to deselect as well as select.
You can also select a block of controls by using the mouse to define an
enclosing rectangle. Position the mouse to one corner of the desired
rectangle (the start position must not be on a control). Hold the left
button down and drag to the opposite corner of the rectangle before
releasing the button. During the drag operation, a shaded area will show
the rectangle. T